<?php
	/**
	 * @ignore 
	 */
	if( defined("apl_".__FILE__) ) return;
	define("apl_".__FILE__,"apl_".__FILE__);
	
/**
 * HTML Display helper functions
 *
 * @package apl
 * @subpackage helpers
 */
class AplHtmlHelper{
	
	public static function includeStyleSheet( $sheetFile )
    {
    	echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$sheetFile\">"; 
    }
    public static function includeJavaScriptSource( $pathToFile )
    {   
    	echo "<script type=\"text/javascript\" src=\"$pathToFile\"></script>";
    }
    public static function jsRedirect( $file )
	{
		echo "<script language='javascript'>document.location.href='$file';</script>";
	}
	public static function jsAlert( $msg )
	{
		echo "<script language='javascript'>alert('$msg');</script>";
	}
	public static function getJSString($str)
	{
		$escapedStr = str_replace("'","&#39;",$str);
		$escapedStr = str_replace("\"","&#34;",$escapedStr);
		return $escapedStr;
	}
}